package com.hjw.inheritance.exer;

/**
 * @author hjwStrart
 * @create 2022-01-12 11:12
 */
public class Car extends Vehicle{
    private Integer loader;//限载人数

    public Car(String brand, String color, Integer loader) {
        super(brand, color);
        this.loader = loader;
    }

    @Override
    public void run() {
        System.out.println("限载人数为："+loader + "的" +getColor() + "色" + getBrand() +"正在以" + getSpeed() + "的速度行驶。");
    }
}
